package com.yytek.nmp.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.yytek.common.core.annotation.Excel;
import com.yytek.common.core.web.domain.BaseEntity;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 设备分组对象 iot_device_group
 * 
 * @author yytek-iot
 * @date 2022-07-05
 */
@ApiModel("设备分组对象")
public class IotDeviceGroup extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 分组id */
    @ApiModelProperty("分组id")
    private Long id;

    /** 分组名称 */
    @Excel(name = "分组名称")
    @ApiModelProperty("分组名称")
    private String groupName;

    /** 项目id */
    @Excel(name = "项目id")
    @ApiModelProperty("项目id")
    private Long projectId;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setGroupName(String groupName) 
    {
        this.groupName = groupName;
    }

    @NotBlank(message = "项目名称不能为空")
    public String getGroupName() 
    {
        return groupName;
    }
    public void setProjectId(Long projectId) 
    {
        this.projectId = projectId;
    }

    @NotNull(message = "项目id不能为空")
    public Long getProjectId() 
    {
        return projectId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("groupName", getGroupName())
            .append("projectId", getProjectId())
            .toString();
    }
}
